Class TomatoPile

java.lang.Object
  extended by greenfoot.Actor
      extended by TomatoPile

public class TomatoPile
extends greenfoot.Actor

A pile of tomatoes.

Version:
1.0.1
Author:
Michael Kolling

Constructor Summary
TomatoPile(int tomatoes)
          Create a pile of a given number of tomatoes.
 
Method Summary
 void takeOne()
          Remove a tomato from this pile.
 
Methods inherited from class greenfoot.Actor
act, addedToWorld, getImage, getIntersectingObjects, getNeighbours, getObjectsAtOffset, getObjectsInRange, getOneIntersectingObject, getOneObjectAtOffset, getRotation, getWorld, getX, getY, intersects, setImage, setImage, setLocation, setRotation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TomatoPile

public TomatoPile(int tomatoes)
Create a pile of a given number of tomatoes.

Method Detail

takeOne

public void takeOne()
Remove a tomato from this pile. (If it was the last one, this pile will disappear from the world.)